package test.fibonacci;

public class MainClass {
	
	/**
	 * Run the sample.
	 * @param args the number to calculate fib
	 */
	
	public static void main(String[] args){
		int n = 20;
		
		if (args.length != 0)
			n = Integer.parseInt(args[0]);
		System.out.println("Calculando fibonacci de "+n);			
		Fibonacci tf = new Fibonacci();

		long start = System.currentTimeMillis();
		
		long result = tf.fib(n);
		long end = System.currentTimeMillis();
		double time = ((double) end - start) / 1000.0;
		System.out.println("Fibonnaci (" + n + ") = " + result + " took time: "+time+ " s");		
		System.exit(1);
	}

}
